allows you to include a ``raw'' PostScript file
using TEX's \special
command. However, if you have a choice then
any of the methods described in the above sections are preferable because cannot preview such a file,
nor can it print the file on a non-PostScript printer.
Assuming you have a file called fig.ps
that contains
PostScript code for generating some sort of figure, the following command
can be used to include this figure in a TEX or LATEX document:
\special{fig.ps}
When printing the DVI file, interprets the \special
argument as
a file name and then includes this file with the rest of the PostScript output.
If it can't find the file in the current folder then it looks in the
ps_folders
list.
Don't worry about removing any showpage
command at the end of
your PostScript file because temporarily disables it.
It may take a little practice to position the figure correctly.
The default PostScript origin is at the bottom left corner of the paper.
However, when you include a file, automatically moves the
origin to the position of the \special
.
You can move the figure about by shifting the \special
position,
or by using a translate
command in the PostScript file.
The latter option is faster because you don't have to run TEX again.
Alternatively, you may prefer to place your figure at an absolute position on
the paper. Simply use a command like initgraphics
in the PostScript
file. The position of the \special
command then becomes irrelevant;
just make sure it's on the right page!
also allows arbitrary PostScript code to appear after the file name.
At least one space must be used to terminate the file name;
further characters are included as a new line at the start of
the given file.
For example,
\special{fig.ps 2 1 scale}
could be used to double the width of the figure.
This feature allows you to include the same PostScript file more than once,
but with a different starting line each time — useful if you need to produce
the same diagram many times but with slight variations.